home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 35 / PC Gamer IT CD 35 1-2.iso / Elink / NSCOMM / NCJS10.JAR / webctrl.js < prev   
Text File  |  1997-10-20  |  2KB  |  115 lines

  1. /*
  2.  * webctrl.js
  3.  * 
  4.  * Copyright (c) 1997 Netscape Communications Corporation, All Rights Reserved
  5.  * 
  6.  * Functions to deal with the web toolbar
  7.  */
  8.  
  9. var lastHiliteBtn = "";
  10. var allDisabled = true;
  11. var backDisabled = true;
  12. var fwdDisabled = true;
  13.  
  14. function toolbarHilite(buttonName)
  15. {
  16.     if (lastHiliteBtn != "")
  17.         toolbarLolite(lastHiliteBtn);
  18.  
  19.     document.layers[buttonName].visibility='show';
  20.     lastHiliteBtn = buttonName;
  21. }
  22.  
  23. function toolbarLolite(buttonName)
  24. {
  25.     document.layers[buttonName].visibility='hide';
  26. }
  27.  
  28. function fixButtons(webtop)
  29. {
  30.     if (webtop && webtop != null) {
  31.         // First do security.
  32.         if (webtop.secure)  {
  33.            document.layers['secureImage'].visibility='show';
  34.         }
  35.         else
  36.            document.layers['secureImage'].visibility='hide';
  37.         document.layers['backGrey'].visibility='hide';
  38.         backDisabled = false;
  39.         document.layers['fwdGrey'].visibility='hide';
  40.         fwdDisabled = false;
  41.         document.layers['allGrey'].visibility='hide';
  42.         allDisabled = false;
  43.  
  44.     }
  45.     else {
  46.         document.layers['backGrey'].visibility='show';
  47.         backDisabled = true;
  48.         document.layers['fwdGrey'].visibility='show';
  49.         fwdDisabled = true;
  50.         document.layers['allGrey'].visibility='show';
  51.         allDisabled = true;
  52.            document.layers['secureImage'].visibility='hide';
  53.     }
  54. }
  55.  
  56. function GoBack()
  57. {
  58.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  59.  
  60.     desktopMgr.back();
  61. }
  62.  
  63. function GoForward()
  64. {
  65.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  66.  
  67.     desktopMgr.forward();
  68. }
  69.  
  70. function UpdateWebtop()
  71. {
  72.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  73.  
  74.     desktopMgr.update();
  75. }
  76.  
  77. function ShowHideWebtop()
  78. {
  79.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  80.  
  81.     desktopMgr.toggle();
  82. }
  83.  
  84. function FrontBackWebtop()
  85. {
  86.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  87.  
  88.     desktopMgr.toggleTop();
  89. }
  90.  
  91. function CloseWebtop()
  92. {
  93.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  94.  
  95.     desktopMgr.closeWebtop();
  96. }
  97.  
  98. function PrintWebtop()
  99. {
  100.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  101.  
  102.     desktopMgr.print();
  103. }
  104.  
  105. function OpenNavigator()
  106. {
  107.     desktopMgr = desktopMgrWindow.GetDesktopManager();
  108.  
  109.     desktopMgr.openNavigator();
  110. //    desktopMgrWindow.parent.opener.HideSelector();
  111. }
  112.  
  113. void(0);
  114.  
  115.